﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MG.HomeO2O.Model;
using MG.HomeO2O.BLL;
namespace MG.HomeO2O.Admin.Hander
{
    /// <summary>
    /// member_list 的摘要说明
    /// </summary>
    public class member_list : IHttpHandler
    {
        member_listBLL bll = new member_listBLL();
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            ////前台 html页面，只能解析 json格式的字符串 ，所以才把list集合 序列化成 json 字符串
            ////获取list数据
            List<personnel> list = bll.pershow();

            ////序列化 用 JsonHelper 帮助类 ，JsonSerializer,只有列表数据 才 序列化
            //string str = JsonHelper.JsonSerializer<List<personnel>>(list);
            context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer { MaxJsonLength =Int32.MaxValue }.Serialize(list));//json
     
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}